package com.prik.command.simple;

import com.prik.command.Command;

/**
 * @description: simple
 * @author: prik
 * @create: 2019-08-08
 **/
public class SimpleRemoteControl {

    /**
     * 遥控器上的一个插槽
     */
    Command slot;

    public SimpleRemoteControl() {
    }

    /**
     * 给插槽指定命令
     *
     * @param command
     */
    public void setCommand(Command command) {
        slot = command;
    }

    /**
     * 按下按钮
     */
    public void pressButton() {
        slot.execute();
    }
}